<template>
    <div>
        <!-- 面包屑导航 -->
        <el-breadcrumb separator-class="el-icon-arrow-right">
            <el-breadcrumb-item :to="{ path: '/welcome' }">首页</el-breadcrumb-item>
            <el-breadcrumb-item>数据统计</el-breadcrumb-item>
            <el-breadcrumb-item>数据报表</el-breadcrumb-item>
        </el-breadcrumb>
        <br />
        <el-card>
            <div id="main" style="width: 750px;height:400px;"></div>
        </el-card>
    </div>
</template>
<script>
import echarts from "echarts";
export default {
    data() {
        return {
        };
    },
    created() {},
    mounted() {
        var myChart = echarts.init(document.getElementById("main"));
        this.$axios.get("reports/type/1").then(response => {
            let res = response.data;
            if (res.meta.status !== 200)
                return this.$message({
                    message: "获取折线图失败！",
                    type: "error",
                    showClose: true
                });
            myChart.setOption(res.data);
        });

        // 使用刚指定的配置项和数据显示图表。
    }
};
</script>
<style lang="less" scoped>
</style>